﻿using System;


namespace _1
{
    class Program
    {
        static void Main(string[] args)
        {
            int i = 1;
            int s = 0, k = 0;  
            while(i<=1000)
            {
                if(i%7==0)
                {
                    
                    if (k % 5 != 0 || k == 0)
                    {
                        s =s+ i;
                        k++;
                    }
                    else
                    {
                        k = 0;
                        Console.WriteLine(s);
                        s = 0;
                    }Console.WriteLine( i);
                }
                i++;
            }
            Console.ReadKey();
        }
    }
}
